package org.example.what_mall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema(description = "类目")
@TableName("categories")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Category {
    @Schema(description = "类目id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "类目名称")
    @TableField(value = "name")
    private String name;
}
